package com.qm.service;

import java.util.ArrayList;

import org.apache.catalina.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import com.qm.dao.CommonDAO;
import com.qm.dao.UsersDAO;
import com.qm.model.Users;
@Service
public class CommonService {
	@Autowired
	@Qualifier("commonDao")
	private CommonDAO  cdao;

	/**
	 * login 登陆
	 * @param unumber
	 * @param upassword
	 * @return
	 */
	public Users checkLogin(String unumber, String upassword) {
		// TODO Auto-generated method stub
		Users l= cdao.checkUser(unumber, upassword);
		System.out.println(l);
		return l;
	}
	/**
	 * changgePassword 修改密码
	 * @param u
	 * @return
	 */
	public int changePassword(Users u){ 
		int result=cdao.changePassword(u);
		System.out.println(result);
		return result;
	}
	/**
	 * 修改用户信息
	 * @param u
	 * @return
	 */
	public int changeUserInfo(Users u){
		int result=cdao.changeUserInfo(u);
		return result;
	}
	

}
